사용자 지정 리소스 제공 기능은 Trilium에 가져온 이미지와 글꼴 및 스타일시트 등의 파일을 공개 주소로 제공합니다. 테마와 함께 사용자 글꼴을 제공할 때 활용할 수 있습니다.
#customResourceProvider=hello 라벨을 추가합니다.<protocol>://<host>/custom/hello를 엽니다. protocol에는 환경에 맞는 http나 https를 사용합니다. host는 Trilium 서버의 주소입니다. 별도 서버 없이 데스크톱 앱만 사용한다면 기본 주소는 http://localhost:37840입니다.hello 대신 다음과 같은 이름도 사용할 수 있습니다.
fonts/Roboto.ttf로 지정하면 <host>/custom/fonts/Roboto.ttf로 접근합니다.hello/.*로 지정하면 /custom/hello/1과 /custom/hello/2 또는 /custom/hello/world처럼 여러 경로에 대응합니다.글꼴 파일을 가져온 뒤 #customResourceProvider=fonts/myfont.ttf 속성을 지정하세요. 테마 CSS에서는 다음처럼 불러올 수 있습니다.
@font-face {
font-family: customFont;
src: url("/custom/fonts/myfont.ttf");
}
div {
font-family: customFont;
}